package org.qiaice.enums;

import lombok.Getter;

@Getter
public enum Code {
    OK(1, "资源请求成功"),
    NO(400, "资源请求失败"),
    CREATED(201, "资源创建成功"),
    UPDATED(204, "资源更新成功"),
    UNAUTHORIZED(401, "请求未经授权"),
    FORBIDDEN(403, "用户权限不足"),
    ERROR(500, "服务器内部错误"),
    ;

    private final Integer code;
    private final String msg;

    Code(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
